package day6;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

/**
 * @author oldliu
 * @since 1.0
 */
public class FileReaderTest {
    public static void main(String[] args) {
        //utf-8 三个字节
        //gbk   2个字节
        try {
            FileReader fr=new FileReader("F:/java76/yangshuo/名单.txt");
            int ch=0;
            while ((ch=fr.read())!=-1){
                System.out.println(ch+","+(char)ch);
            }
            fr.close();//这样不好
        } catch (IOException e) {
            e.printStackTrace();
        }

    }
}
